package cn.ray.springframework.context.support;

import cn.ray.springframework.beans.BeansException;

import java.beans.Beans;

//重要的功能能已经由抽象类层层分离，此类只是给用户提供应用上下文
public class ClassPathXmlApplicationContext extends AbstractXmlApplicationContext{
    String[]configLocations;
    public ClassPathXmlApplicationContext(){

    }

    public ClassPathXmlApplicationContext(String configLocations) throws BeansException {
        this(new String[]{configLocations});
    }
    public ClassPathXmlApplicationContext(String[]configLocations)throws BeansException{
        this.configLocations=configLocations;
        refresh();
    }

    @Override
    protected String[] getConfigLocations() {
        return configLocations;
    }
}
